package de.fhaugsburg.games.boardgames.connect4.consoleui;


import de.fhaugsburg.games.boardgames.connect4.Connect4Board;

public class BoardView {
	
		public void renderConnect4Board(Connect4Board board){
		System.out.println();
		for (int i = 1; i <= board.getWidth(); i++) {  // Spaltenbeschriftung printen
			System.out.print(i);
		}
		System.out.print("\n");
		for (int row = 0; row < board.getHeight(); row++) {  //das eigentl. Board rendern
			for (int column = 0; column < board.getWidth(); column++) {
				if(board.isEmpty(row, column)){
					System.out.print(".");
				}else{
				System.out.print(board.getPiece(row,column));
				}
			}
			System.out.println();
		}
		for (int i = 1; i <= board.getWidth(); i++) {
			System.out.print(i);
		}
		System.out.println();
		
	}

}
